import request from '@/utils/request'

// /dev-api/system/text/list 查询文本列表
export function listText(query) {
  return request({
    url: '/system/text/list',
    method: 'get',
    params: query
  })
}
//查询文本列表-查询归属医院的和科室集合
export function listTextDept(query) {
  return request({
    url: '/system/text/list/dept',
    method: 'get',
    params: query
  })
}

// 获取文本详细信息 /dev-api/system/text/{textId}
export function getText(textId) {
  return request({
    url: '/system/text/' + textId,
    method: 'get'
  })
}

// 新增文本 /dev-api/system/text
export function addText(data) {
  return request({
    url: '/system/text',
    method: 'post',
    data: data
  })
}

//修改文本 /dev-api/system/text
export function updateText(data) {
  return request({
    url: '/system/text',
    method: 'put',
    data: data
  })
}

// 删除文本 /dev-api/system/text/{textIds}
export function delText(textIds) {
  return request({
    url: '/system/text/' + textIds,
    method: 'delete'
  })
}

//查询平台文本列表
export function listPlatformText(query) {
  return request({
    url: '/system/text/platformList',
    method: 'get',
    params: query
  })
}

//复制平台文本
export function copyPlatformText(data, deptId, hospitalId) {
  return request({
    url: "/system/text/copyPlatform/" + deptId + "/" + hospitalId + "/" + data,
    method: "get",
  });
}
///system/text/info/list  查询文本列表（多个）

export function listTextInfo(query) {
  return request({
    url: '/system/text/info/list',
    method: 'get',
    params: query
  })
}

